<template>
  <!-- 本部门导入的劳动积分 -->
  <div class="app-container">
    <el-table border v-loading="loading" :data="labourScoreList">
      <el-table-column label="学期" align="center" prop="orgName" />
      <el-table-column label="系部" align="center" prop="unitName" />
      <el-table-column label="学号" align="center" prop="studentId" />
      <el-table-column label="姓名" align="center" prop="studentName" />
      <el-table-column label="班级" align="center" prop="classNo" />
      <el-table-column label="项目类型" align="center" prop="grade" />
      <el-table-column label="子项内容" align="center" prop="teacherName" />
      <el-table-column label="时长" align="center" prop="studentName" />
      <el-table-column label="等级" align="center" prop="studentName" />
      <el-table-column label="本次获得积分" align="center" prop="studentName" />
      <el-table-column label="劳动教育累计积分" align="center" prop="studentName" />
      <el-table-column label="登记部门" align="center" prop="orgName" />
      <el-table-column label="记录时间" align="center" prop="createTime" />
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
  </div>
</template>

<script>
import { listOrg } from "@/api/educationManager";
import { mapGetters } from 'vuex';

export default {
  name: "labourScore",
  dicts: ['sys_normal_disable', 'orgStatus'],
  computed: {
    ...mapGetters(['roles', 'name', 'userName','unitName']),
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 组织信息表格数据
      labourScoreList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        college: null,
      },
    };
  },
  created() {
    this.queryParams.college = this.unitName;
    this.getList();
  },
  methods: {
    /** 查询组织信息列表 */
    getList() {
      this.loading = true;
      listOrg(this.queryParams).then(response => {
        this.labourScoreList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
  }
};
</script>
